package cn.backpackerxl.easyJDBC.util;

import java.util.List;

/**
 * 分页类
 *
 * @author: backpackerxl
 * @create: 2021/12/26
 * @filename: Page
 **/
public class PageBean<E> {
    private int currentPage;
    private int pageSize;
    private int totalPage;
    private int totalObj;
    private List<E> pageList;

    public PageBean(int currentPage, int pageSize, int totalPage, int totalObj, List<E> pageList) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.totalPage = totalPage;
        this.totalObj = totalObj;
        this.pageList = pageList;
    }

    public PageBean() {
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalObj() {
        return totalObj;
    }

    public void setTotalObj(int totalObj) {
        this.totalObj = totalObj;
    }

    public List<E> getPageList() {
        return pageList;
    }

    public void setPageList(List<E> pageList) {
        this.pageList = pageList;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", totalPage=" + totalPage +
                ", totalObj=" + totalObj +
                ", pageList=" + pageList +
                '}';
    }
}
